#pragma once
#include <memory>
#include <nice2d/actions/finitetimeaction.h>
#include <nice2d/piece/piecescene.h>

class PieceMoveAction : public FiniteTimeAction
{
public:
    PieceMoveAction(std::shared_ptr<PieceScene> scene,const sf::Vector2i &position,float duration = 3.0f);
    ~PieceMoveAction();
public:
    void setTargetTile(const sf::Vector2i &position);
    sf::Vector2i getOldPosition()const;
protected:
    void update(float deltaTime)override;
private:
    std::unique_ptr<class PieceMoveActionData> data;
};
